<template>
    <div class="aside-menu">
        <el-container>
            <el-aside width="150px">
                <el-menu default-active="Diary" @select="onSelect">
                    <el-menu-item index="Diary">
                        <span>现场施工日记</span>
                    </el-menu-item>
                    <el-menu-item index="Statistics">
                        <span>现场用工统计</span>
                    </el-menu-item>
                    <el-menu-item index="Risk" disabled>
                        <span>技术交底</span>
                    </el-menu-item>
                    <el-menu-item index="DisclosureHazard">
                        <span>质量缺陷排查</span>
                    </el-menu-item>
                    <el-menu-item index="Risk" disabled>
                        <span>安全交底</span>
                    </el-menu-item>
                    <el-menu-item index="SafeHazard">
                        <span>安全隐患排查</span>
                    </el-menu-item>
                </el-menu>
            </el-aside>
            <el-main>
                <component :is="Diary" v-if="value == 'Diary'" />
                <component :is="Statistics" v-if="value == 'Statistics'" />
                <component :is="DisclosureHazard" v-if="value == 'DisclosureHazard'" />
                <component :is="SafeHazard" v-if="value == 'SafeHazard'" />
            </el-main>
        </el-container>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import Diary from '../scene/diary.vue';
import Statistics from '../scene/statistics.vue';
import DisclosureHazard from './components/disclosureHazard.vue';
import SafeHazard from './components/safeHazard.vue';
const value = ref('Diary')
const onSelect = (data: any) => {
    value.value = data
}
</script>

<style scoped>

</style>